<%= form_for [:admin, @hot_tag], html: { class: "card" } do |f| %>
  <div class="card-body">
    <h3 class="card-title">
      <%= @hot_tag.new_record? ? "新增频道" : "修改频道"%>
    </h3>
    <div class="row">
      <div class="col-md-4">
        <div class="form-group">
          <label class="form-label">名字</label>
          <%= f.text_field :name, class: "form-control" %>
        </div>
      </div>
      <div class="col-md-4">
        <div class="form-group">
          <label class="form-label">排序</label>
          <%= f.number_field :sort, class: "form-control" %>
        </div>
      </div>
      <div class="col-md-4">
        <div class="form-group">
          <div class="form-label">是否显示</div>
          <div class="custom-controls-stacked">
            <label class="custom-control custom-checkbox">
              <%= f.check_box :published, class: "custom-control-input" %>
              <span class="custom-control-label">勾选就在前端显示</span>
            </label>
          </div>
        </div>
      </div>
      <div class="col-md-4">
        <div class="form-group">
          <div class="form-label">跳转类型</div>
          <div class="custom-controls-stacked">
            <label class="custom-control custom-radio custom-control-inline">
              <%= f.radio_button :page_type, "Web", { class: "custom-control-input" } %>
              <span class="custom-control-label">网页</span>
            </label>
            <label class="custom-control custom-radio custom-control-inline">
              <%= f.radio_button :page_type, "Native", { class: "custom-control-input" } %>
              <span class="custom-control-label">APP</span>
            </label>
          </div>
        </div>
      </div>
      <div class="col-md-4">
        <div class="form-group">
          <label class="form-label">跳转目标</label>
          <%= f.text_field :page_url, class: "form-control" %>
        </div>
      </div>
      <div class="col-md-4">
        <div class="form-group">
          <label class="form-label">跳转参数</label>
          <%= f.text_field :params, class: "form-control" %>
        </div>
      </div>
    </div>
  </div>
  <div class="card-footer text-right">
    <button type="submit" class="btn btn-primary">保 存</button>
  </div>
<% end %>